package com.zhanghw.shop.service;

import cn.sourcespro.commons.data.vo.NodeVo;
import com.zhanghw.shop.data.dto.SearchAreaDto;
import com.zhanghw.shop.data.entity.Area;
import com.baomidou.mybatisplus.core.metadata.IPage;

import java.util.List;

/**
 * 地区 Service
 *
 * @author 张浩伟
 * @date 2018/11/23
 */
public interface AreaService {

    Area add(Area bean);

    Area update(Area bean);

    Area findById(Long id);

    Area findByUuid(String uuid);

    IPage<Area> findAll(SearchAreaDto condition);

    int selectCount(SearchAreaDto condition);

    List<Area> findByPid(Long pid);

    List<Area> findByPidCascaded(Long pid);

    List<NodeVo<Long>> findNodeByPidCascaded(Long pid);

    int batchInsert(List<Area> list);

    List<Area> batchQueryByIds(List<Long> ids);

    List<Area> batchQueryByUuids(List<String> uuids);

    int delete(Long id);

    int delete(String uuid);

    int delete(Area bean);

    int batchDeleteById(List<Long> ids);

    int batchDeleteByUuid(List<String> uuids);

}
